As you've seen so far, creating databases and users
requires manual scripting and switching database connections. The
fundamental differences between SQL Server and SQL Azure lie in the
basic design principals of cloud computing, in which performance, ease
of use, and scalability must be carefully balanced. The fact that user
databases can be located on different physical servers imposes natural
limitations. In addition, designing applications and services against
SQL Azure requires you to have a strong understanding of these
limitations.
1. Security
From a security standpoint, you need to consider the following
constraints:
Encryption.
Although SQL Azure uses SSL for data transfers, it doesn't support the
data-encryption functions available in SQL Server. However, SQL Azure
provides support for the existing hashing functions.
SSPI authentication.
SQL Azure only supports database logins. As a result, network logins
using Security Support Provider Interface (SSPI) aren't supported.
Connection constraints. In certain cases, the database connection is closed for one of the following reasons:
Disallowed user names. Certain user names can't be created for security reasons:
sa
admin
administrator
guest
root
Login name.
In certain cases, you may need to append the server name to the login
name to correctly log in, in this format: [loginName]@[servername]. So,
avoid using the arrobas character (@) in login names.
TCP port 1433. Only TCP Port 1433 is allowed. It isn't possible to define another listening port for SQL Azure.
2. Backups
Backing up your SQL Azure
database is somewhat different from backing up traditional SQL Server
databases. You can't back up a SQL Azure database in the traditional
sense, nor can you restore a SQL Server database in SQL Azure. You do,
however, have the ability to create a transactionally consistent clone
of a SQL Azure database. You can expect the following regarding backups:
Backup/Restore operations. These operations aren't available. In addition, you may not attach or detach a SQL Azure database.
Clone operations. You may create a clone of a SQL Azure database into another one using the CREATE DATABASE statement.
Log files. You can't access the database log files, nor can you create a log backup.
3. Objects
Certain objects available in
SQL Server aren't available in SQL Azure. If your applications depend
heavily on these features, you may have difficulty using SQL Azure, and
you may need to rethink your application design to accommodate these
limitations. The following are some of the limitations that currently
apply to SQL Azure:
CLR. The .NET CLR isn't available in SQL Azure. As a result, you can't create extended stored procedures or extended functions.
System functions.
SQL Azure supports many system functions, including Aggregate functions
and Ranking functions. However, SQL Azure doesn't support RowSet
functions, including these:
OPENQUERY
OPENXML
OPENROWSET
OPENDATASOURCE
System stored procedures. Only a small subset of system stored procedures are available in SQL Azure, in the following categories:
Catalog stored procedures
Database engine stored procedures
Security stored procedures
System tables. None of the system tables are available.
System views.
A subset of system views is available; you can access some of them from
the master database and others from user databases. The following are
some of the system views available (for a complete list, refer to the
online MSDN library for SQL Azure):
sys.sql_logins
sys.views
sys.databases
sys.columns
sys.objects
Heap tables. SQL Azure doesn't allow the use of heap tables. All tables must have a primary |key.
4. Miscellaneous
In addition to
the limitations outlined so far, additional components and options
offered by SQL Server aren't available in SQL Azure. For the most part,
these limitations shouldn't affect your application designs, but
they're good to keep in mind:
Maximum number of databases. You can create no more than four user databases.
Distributed transactions. Although SQL transactions are supported, distributed transactions aren't supported across SQL Azure databases.
Collation.
SQL Azure only supports collation at the column level, or using an
expression at execution time. Server- and database-level collations
can't be changed and are set to SQL_LATIN1_GENERAL_CP1_CI_AS.
English language. SQL Azure only supports the English language.
Database size. You can only create databases of specific sizes, as outlined previously.
Database file placement.
You can't choose how the database files are deployed physically; you
can't control filegroups, either. This is handled automatically by the
Microsoft data center for optimum performance.
Trace flags. Trace flags aren't available.
SQL Server configuration options. None of the general SQL Server options are available, including CPU and I/O affinity.
Service Broker. The Service Broker isn't available.
Global temporary tables. The global temporary tables aren't available. However, you can use local temporary tables.
SQL Server Agent. The SQL Server Agent isn't available.
5. Drivers and Protocols
You should also know
that accessing SQL Azure can only be performed using specific
libraries. This may be relevant if you don't use ADO.NET in your
programming stack. For example, older versions of Delphi can't connect
to SQL Azure. Here is a summary of the supported data libraries:
TDS version 7.3. Any client using a TDS version prior to 7.3 isn't supported.
OLE DB. Connecting with OLE DB isn't permitted.
Drivers and libraries. The following drivers and libraries are allowed:
.NET Framework Data Provider for SQL Server from .NET 3.5 SP1
SQL Server 2008 Native Client ODBC driver
SQL Server 2008 driver for PHP version 1.1